package com.str.tree;

/**
 * 
 */
public class TreeNode {

	// Each LinkedTreeTreeNode object is a TreeNode of an
	// unordered tree, and contains a single element.
	// This tree TreeNode consists of an element (element), a link to its first
	// child (firstChild) a link to its parent (parent), and a link to its
	// next sib (nextSib).
	Object data;
	TreeNode leftChild;
	TreeNode rightSib;

	TreeNode() {
	}

	TreeNode(Object obj) {
		data = obj;
	}

	TreeNode(Object obj, TreeNode leftc, TreeNode rights) {
		// Construct a tree TreeNode, containing element elem, that has no
		// children, no parent, and no sibs.
		data = obj;
		leftChild = leftc;
		rightSib = rights;
	}

	public String toString() {
		return data.toString();
	}
}